using System.Configuration;

namespace SouthernLand.Common
{
    public class TheBeerHouseSection : ConfigurationSection
    {
        [ConfigurationProperty("defaultConnectionStringName", DefaultValue = "SqlServices")]
        public string DefaultConnectionStringName
        {
            get { return (string) base["defaultConnectionStringName"]; }
            set { base["connectionStdefaultConnectionStringNameringName"] = value; }
        }

        [ConfigurationProperty("namespace", DefaultValue = "SouthernLand")]
        public string DefaultNamespace
        {
            get { return (string) base["namespace"]; }
            set { base["namespace"] = value; }
        }

        [ConfigurationProperty("AppName", DefaultValue = "SouthernLand")]
        public string AppName
        {
            get { return (string) base["AppName"]; }
            set { base["AppName"] = value; }
        }

        [ConfigurationProperty("AppRoles", IsRequired = true)]
        public AppRolesElement AppRoles
        {
            get { return (AppRolesElement) base["AppRoles"]; }
        }

        [ConfigurationProperty("JobPreferences", IsRequired = true)]
        public JobPreferencesElement JobPreferences
        {
            get { return (JobPreferencesElement) base["JobPreferences"]; }
        }
    }

    public class JobPreferencesElement : ConfigurationElement
    {
        [ConfigurationProperty("MaxUserJobCategory")]
        public string MaxUserJobCategory
        {
            get { return (string) base["MaxUserJobCategory"]; }
            set { base["MaxUserJobCategory"] = value; }
        }

        [ConfigurationProperty("MaxUserJobLocation")]
        public string MaxUserJobLocation
        {
            get { return (string) base["MaxUserJobLocation"]; }
            set { base["MaxUserJobLocation"] = value; }
        }
    }

    public class AppRolesElement : ConfigurationElement
    {
        [ConfigurationProperty("KhachHang")]
        public string KhachHang
        {
            get { return (string) base["KhachHang"]; }
            set { base["KhachHang"] = value; }
        }

        [ConfigurationProperty("DoanhNghiep")]
        public string DoanhNghiep
        {
            get { return (string) base["DoanhNghiep"]; }
            set { base["DoanhNghiep"] = value; }
        }

        [ConfigurationProperty("Admin")]
        public string Admin
        {
            get { return (string) base["Admin"]; }
            set { base["Admin"] = value; }
        }
    }
}